def test():
    while True:
        print('======')
        v = yield 200
        print(f"resume {v}")


x = test()
x.send(None)
x.send(10)
x.send(100)

def consumer():
    while True:
        v = yield
        print(f"resume {v}")

def producer(c):
    for i in range(1,13):
        c.send(i)

c = consumer()
c.send(None)
producer(c)
c.close()